package com.bbzn.device.client;


import com.bbzn.device.comment.req.FenceDeviceReq;
import com.bbzn.device.comment.req.FenceReq;
import com.bbzn.device.comment.res.FenceRes;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @Author 蒋洪媛
 * @Date 2021/11/08 11:00
 * @Version 2.0
 */
@FeignClient("device")
@RequestMapping("fence")
public interface FenceClient {

    @PostMapping("/deleteFenceSelective")
    int deleteFenceSelective(@RequestBody FenceReq record) throws Exception;

    @PostMapping("/deleteFenceDeviceSelective")
    int deleteFenceDeviceSelective(@RequestBody FenceDeviceReq record) throws Exception;

    @PostMapping("/findByAll")
    List<FenceRes> findByAll(@RequestBody FenceReq record) throws Exception;

    @PostMapping("/updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(@RequestBody FenceReq record) throws Exception;

    @PostMapping("/isHasFenceByUsers")
    boolean isHasFenceByUsers(@RequestBody Long userId) throws Exception;
}









